package com.sihai.ehr.model.biz;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.sihai.core.BaseEntity;
import com.sihai.ehr.model.sys.SalaryInsurancePayEnum;
import com.sihai.ehr.model.sys.SalaryInsuranceTypeEnum;

/**
 * 社保管理细节项
 * 
 * @author henry
 * 
 */
@Entity
public class SalarySocialInsuranceDetail extends BaseEntity<Long> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 4648114336473020736L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;

	/** 社保方案编号 */
	@ManyToOne(cascade = { CascadeType.MERGE, CascadeType.REFRESH }, optional = true)
	@JoinColumn(name = "insurance_id")
	private SalarySocialInsurance socialInsurance;

	/** 社保缴费类型 */
	@Enumerated(EnumType.STRING)
	private SalaryInsurancePayEnum projectType;
	/** 社保类型　 */
	@Enumerated(EnumType.STRING)
	private SalaryInsuranceTypeEnum insuranceType;

	private String projectTitle;
	/** 缴费比例 */
	private Float occupancyRate;

	@Override
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public SalarySocialInsurance getSocialInsurance() {
		return socialInsurance;
	}

	public void setSocialInsurance(SalarySocialInsurance socialInsurance) {
		this.socialInsurance = socialInsurance;
	}

	public SalaryInsurancePayEnum getProjectType() {
		return projectType;
	}

	public void setProjectType(SalaryInsurancePayEnum projectType) {
		this.projectType = projectType;
	}
	
	public SalaryInsuranceTypeEnum getInsuranceType() {
		return insuranceType;
	}
	
	public void setInsuranceType(SalaryInsuranceTypeEnum insuranceType) {
		this.insuranceType = insuranceType;
	}

	public String getProjectTitle() {
		return projectTitle;
	}

	public void setProjectTitle(String projectTitle) {
		this.projectTitle = projectTitle;
	}

	public Float getOccupancyRate() {
		return occupancyRate;
	}

	public void setOccupancyRate(Float occupancyRate) {
		this.occupancyRate = occupancyRate;
	}
}
